<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { Entity } from './types'
import { getMapItemTypeInfo } from '@/map-item/base'

const props = defineProps<{
  type: string
  item: Entity
}>()

const typeName = ref<string>('')

onMounted(() => {
  typeName.value = getMapItemTypeInfo(props.type)?.typeName || ''
})
</script>
<template>
  <div class="entity-info pane-block">
    <div class="row">
      <div class="col-3em">类型:</div>
      <div class="col">
        {{ typeName }}
      </div>
    </div>
    <div class="row">
      <div class="col-3em">ID:</div>
      <div class="col">{{ item.id }}</div>
    </div>
  </div>
</template>
